#ifndef  SHUNT3_H
#define  SHUNT3_H

#include "windmill.h"
#include "Foc.h"






#define		TSAM_MIN_1					96//96 4us time
#define		TSAM_MIN_2					123//96 4us time
#define		TSAM_MINALL					192	//192





 
typedef struct
{
	s16  Aphasebase;
	s16  Bphasebase;
	s16  Cphasebase;
	s16  Aphaseupval;
	s16  Bphaseupval;
	s16  Cphaseupval;
	s16  Aphasednval;
	s16  Bphasednval;
	s16  Cphasednval;
	s16  AdnPWMCmpdat;
	s16  BdnPWMCmpdat; 
	s16  CdnPWMCmpdat; 
	s16  TG0PWMCmpdat;
	s16  TG1PWMCmpdat; 
	u8   SampleChanel; 
	u16	 ShiftT1Val;
	u16	 ShiftT2Val;
}Shunt3_Lib;
extern volatile Shunt3_Lib Shunt3Pwmval;



void GetShunt3PhaseCurrentFun(void);
void Shunt3ParameterInit(void);
void Shunt3CMPGTriggerCntInitFun(void);
void Shunt3SampShiftFun(void);
void TriggerCHNSelectFun(void);
void ADC1_TGSAMP_CONFIG_R3(void);

#endif


